package com.snail.jj.androiddemos.beans;

import android.util.Log;

import com.snail.jj.androiddemos.abstrahcts.Animal;

import java.io.Serializable;

/**
 * Created by snail on 2017/4/19.
 */

public class Person extends Animal implements Serializable {

    private final static String TAG = "AndroidDemos_Person";

    public String name = "Snail";
    public int age = 18;
    public float weight = 72.4f;
    public float height = 181.5f;

    public Person(String name, int age, float weight, float height) {
        this.name = name;
        this.age = age;
        this.weight = weight;
        this.height = height;
    }

    public Person(String name, float height) {
        this.name = name;
        this.height = height;
    }

    public Person() {   }

    @Override
    public void eat() {
        super.eat();
        Log.i(TAG,"eat");
    }

    @Override
    public void sleep() {
       Log.i(TAG,"sleep");
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", weight=" + weight +
                ", height=" + height +
                '}';
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public float getWeight() {
        return weight;
    }

    public float getHeight() {
        return height;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setWeight(float weight) {
        this.weight = weight;
    }

    public void setHeight(float height) {
        this.height = height;
    }
}
